-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a new test file for mcg cli commands validation with bucket list command verification #11046
Conversation
… verification Signed-off-by: Yulia Persky <[email protected]>
Signed-off-by: Yulia Persky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation
Cluster Name:
Cluster Configuration:
PR Test Suite: tier2
PR Test Path: tests/functional/object/mcg/test_mcg_cli.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
) | ||
logger.info(f"{existing_buckets_num} bucket(s) exist") | ||
|
||
count = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ypersky1980 why do we hardcode 3 buckets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keesturam , Currently 3 is the value of the "count" parameter.
Would you like me to make "count" an argument? Would you like this test to run once with count=3 and another time with count=30?
Signed-off-by: Yulia Persky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation on existing cluster
Cluster Name: ypersky-18four
Cluster Configuration:
PR Test Suite: tier2
PR Test Path: tests/functional/object/mcg/test_mcg_cli.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
] # get rid of empty strings and the title | ||
default_bucket_name = "first.bucket" | ||
existing_buckets_num = len(bucket_names) | ||
assert bucket_names[0] == default_bucket_name, ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first.bucket
might not be the first bucket on the list in case we have leftovers from a previous test, which is pretty likely since we have tests that use the session-scoped bucket_factory fixture.
The list seems to be sorted lexicographically, and not by creation time:
$ mcg-cli bucket create aaa
...
...
$ mcg-cli bucket list 2>/dev/null
BUCKET-NAME
aaa
first.bucket
Furthermore, I suggest we remove any reference to first.bucket
in this test altogether:
- Whether noobaa creates the expected
first.bucket
should not affect this test. We should consider that as a separate mini-feature. - Since it can be removed, an automation issue on a previous test could fail this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagihirshfeld Yes, you are right, removing this check.
Signed-off-by: Yulia Persky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation on existing cluster
Cluster Name: ypersky-18five
Cluster Configuration:
PR Test Suite: tier2
PR Test Path: tests/functional/object/mcg/test_mcg_cli.py
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: keesturam, sagihirshfeld, udaysk23, ypersky1980 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR contains adding a new file for mcg cli commands validation.
Currently there is one test for validation of mcg cli bucket list command.
The test implements the following flow:
1) runs this command to count the number of existing buckets
2) creates number of buckets
3) runs bucket list command again
4) verifies that the number of current buckets equals the number of previously existing and the added ones